<!--
* 修改页面
* @author chenyi
* @email qq228112142@qq.com
* @date 2017-08-08 17:36:01
*-->
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <%@ include file="/common/jsp/resource.jsp" %>
</head>
<body>
<div class="layui-field-box">
    <form class="layui-form" action="">
             <div class="layui-form-item">
            <label class="layui-form-label">主键</label>
            <div class="layui-input-normal">
                <input type="text"  name="id" value="" lay-verify="required" placeholder="请输入主键"  class="layui-input">
            </div>
        </div>
              <div class="layui-form-item">
            <label class="layui-form-label">团队码</label>
            <div class="layui-input-normal">
                <input type="text"  name="teamCodes" value="" lay-verify="required" placeholder="请输入团队码"  class="layui-input">
            </div>
        </div>
              <div class="layui-form-item">
            <label class="layui-form-label">发起人云支付账号</label>
            <div class="layui-input-normal">
                <input type="text"  name="initAccount" value="" lay-verify="required" placeholder="请输入发起人云支付账号"  class="layui-input">
            </div>
        </div>
              <div class="layui-form-item">
            <label class="layui-form-label">发起人姓名</label>
            <div class="layui-input-normal">
                <input type="text"  name="initName" value="" lay-verify="required" placeholder="请输入发起人姓名"  class="layui-input">
            </div>
        </div>
              <div class="layui-form-item">
            <label class="layui-form-label">发起人电话号码</label>
            <div class="layui-input-normal">
                <input type="text"  name="initPhone" value="" lay-verify="required" placeholder="请输入发起人电话号码"  class="layui-input">
            </div>
        </div>
              <div class="layui-form-item">
            <label class="layui-form-label">发起时间</label>
            <div class="layui-input-normal">
                <input type="text"  name="createTime" value="" lay-verify="required" placeholder="请输入发起时间"  class="layui-input">
            </div>
        </div>
              <div class="layui-form-item">
            <label class="layui-form-label">团队人数</label>
            <div class="layui-input-normal">
                <input type="text"  name="teamNumber" value="" lay-verify="required" placeholder="请输入团队人数"  class="layui-input">
            </div>
        </div>
              <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" lay-filter="submit">保存</button>
                <button class="layui-btn" onclick="closeWindow()"> 返回</button>
            </div>
        </div>
    </form>
</div>
<script>
    layui.use(['form'], function () {
        var form = layui.form();
        //监听提交
        form.on('submit(submit)', function (data) {
            $.ajax({
                url: "/team/update",
                type: "post",
                contentType: "application/json",
                data: JSON.stringify(data.field),
                async: false,
                dataType: "json",
                success: function (R) {
                    if (R.code === 0) {
                        alert('操作成功', function (index) {
                            closeWindow();
                        });
                    } else {
                        alert(R.msg);
                    }
                },
                error: function () {
                    alert("系统繁忙");
                }
            });
            return false;
        });
    });
</script>
</body>
</html>
